import React from 'react';
import { Tabs } from 'antd';
import { observer } from 'mobx-react';

@observer
export default class TabsCom extends React.Component {
    render() {
        const { store } = this.props;
        return (
            <Tabs
                onChange={store.onChange}
                activeKey={store.activeKey}
                type={store.type}
                size={store.size}
            >
                {
                    store.tabs && store.tabs.map(d => (
                        <Tabs.TabPane key={d.key} tab={d.name} />
                    ))
                }
            </Tabs>
        )
    }
}